<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:p="http://primefaces.prime.com.tr/ui">

    <ui:composition >

        <p:panel id="addresspanel" header="Addresses">
            <h:outputText escape="false" value="No address found." rendered="#{addressEntityController.allAddresses.size() == 0}"/>
            <h:panelGroup rendered="#{addressEntityController.allAddresses.size() > 0}">
                <p:dataList id="addresslist" value="#{addressEntityController.allAddresses}" 
                            var="address" widgetVar="messageTable" >

                    <h:outputText value="#{address.type}" />
                    <br />

                    <h:outputText value="#{address.streetAddress}" title="#{bundle.CreateAddressEntityTitle_streetAddress}" />
                    <br />

                    <h:outputText value="#{address.city}" title="#{bundle.CreateAddressEntityTitle_city}" />                
                    <h:outputText value=", " />
                    <h:outputText value="#{address.stateOrProvice}" title="#{bundle.CreateAddressEntityTitle_stateOrProvice}" />
                    <br />

                    <h:outputText value="#{address.country}" title="#{bundle.CreateAddressEntityTitle_country}" />
                    <h:outputText value=", " />
                    <h:outputText value="#{address.zipCode}" title="#{bundle.CreateAddressEntityTitle_zipCode}" />
                    <br />
                    <br />
                </p:dataList>
            </h:panelGroup>
        </p:panel>
    </ui:composition>

</html>
